package com.kehutong.house.enums;

import org.coraframework.util.HashID;

/**
 * 车位类型
 */
public enum ParkingType implements HashID {

    FIXED("0", "固定车位"),
    COMMON ("1", "公共车位")
    ;
    private final String id;
    private final String desc ;

    private ParkingType(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }

    public static ParkingType get(String desc) {
        ParkingType[] propertyTypes = values();
        for (ParkingType propertyType : propertyTypes) {
            if (propertyType.getDesc().equals(desc)) {
                return propertyType;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
